home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Corel Draw 9
/
CorelDraw9 Disco 1.iso
/
Scripts
/
header.csc
< prev
next >
Wrap
Text File
|
1999-03-23
|
2KB
|
55 lines
REM Crea una cabecera en el gui≤n actual
REM Copyright 1996 Corel Corporation. Reservados todos los derechos.
REM *****************************************************************
REM Este gui≤n crea una cabecera en el gui≤n actual.
REM Para ejecutar este gui≤n, asφgnelo a un men· o a un bot≤n de la barra de herramientas.
REM A continuaci≤n, abra el gui≤n en el que quiere insertar la cabecera
REM y ejecute el gui≤n de cabecera.
REM ******************************************************************
REM Realice una revisi≤n
REM para asegurarse de que este gui≤n no se
REM estß ejecutado desde el editor de guiones...
WITHOBJECT "CorelScript.Automation.9"
.GoToLine 11
Match$ = .GetLineText ()
IF Match$ = "REM Perform a sanity check" THEN
MESSAGE "This script should not be run from the Corel SCRIPT Editor."
END
ENDIF
END WITHOBJECT
' Defines
#define IDOK 1
#define IDCANCEL 2
' Adds Specified header info
sub WriteHeader(Name as string, Desc as string)
DIM DateStamp AS DATE
DateStamp=CDAT(Fix(GetCurrDate()))
withobject "CorelScript.Automation.9"
.GotoLine 1
.AddLineBefore "REM " & Name & " for v9.0, created on " & str(DateStamp)
.AddLineBefore "REM " & Desc
end withobject
end sub
'####################################################################
' Main section
DIM Name AS STRING
DIM Desc AS STRING
BEGIN DIALOG Header 199, 92, "Header Maker" ' Ask for header name and description
TEXT 5, 5, 105, 10, "Script Name"
TEXTBOX 5, 15, 190, 15, Name$
TEXT 5, 35, 75, 10, "Description"
TEXTBOX 5, 45, 190, 15, Desc$
OKBUTTON 50, 70, 40, 14
CANCELBUTTON 110, 70, 40, 14
END DIALOG
if (dialog(Header)=IDOK) then WriteHeader Name$, Desc$